#ifndef CONTROL_H
#define CONTROL_H

#include <QWidget>
#include <QUdpSocket>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QTimer>
#include <QDateTime>
#include <QImage>
#include <QFileDialog>
#include <QMessageBox>
//监控
namespace Ui {
class Control;
}

class Control : public QWidget
{
    Q_OBJECT

public:
    explicit Control(QWidget *parent = 0);
    ~Control();
    QString request;
   //套接字
   QUdpSocket *udpSocket;
   //定时器
   QTimer *timer;
   // 截图
   QImage screenshot;

private:
    Ui::Control *ui;
private slots:
    //发送消息给服务器
    void sendRequest();
    //接收视频流
    void processDatagrams();
    //截图槽函数
    void takeScreenshot();
    //保存槽函数
    void saveScreenshot();
};

#endif // CONTROL_H
